import { createStore } from 'vuex'

const actions = {
  changeTitle(context, value) {
    context.commit('changeTitle', value)
  },
  setShow(context, value) {
    context.commit('setShow', value)
  }
}

const mutations = {
  changeTitle(state, value) {
    // console.log(state, value)
    state.audTitle = value
  },
  setShow(state, value) {
    state.isHide = value
  }
}

const state = {
  audTitle: '',
  isHide: true
}

export default createStore({
  actions,
  mutations,
  state() {
    return state
  }
})